home *** CD-ROM | disk | FTP | other *** search
- 10 ;SRCH DSK 1
- 15 ;BASIC LINE NUMBER AND SYSTEM
- 20 .B 11 8 10 0 158 50 48 54 49 0 0 0
- 30 LDA #$00
- 40 STA $D020
- 50 STA $D021
- 60 LDA #$17
- 70 STA $D018
- 80 LDA #$93:JSR PRINT;CLEAR SCREEN
- 90 LDA #$00;ZERO ALL VARIABLES
- 100 STA TRK;HOLDS CURRENT TRACK #
- 110 STA A:STA X:STA Y;SPARE REGISTERS
- 120 STA SEC;HOLDS CURRENT SECTOR #
- 130 STA STRING;HOLDS # OB YTES SEARCHING FOR
- 140 JSR INIT;INITIALIZE DISK
- 150 JSR SCREEN;SCREEN FORMAT
- 160 JSR G;GET KEYSTROKES FROM KEYBOARD
- 170 SRCH1 LDX #$FF
- 180 TXS;SET STACK TO BOTTOM (#$FF)
- 190 INC TRK;INCREMENT TRACK #
- 200 LDA TRK
- 210 CMP #$24;IF TRK # 36 FINISHED
- 220 BEQ END
- 230 JSR SECTOR;GET # OF SEC ON TRK
- 240 JSR LIST;SEND TRACK READ TO DISK
- 250 LDY #$00
- 260 LP LDA MW,Y;TRK # TO $06 IN 1541
- 270 JSR OUT
- 280 INY
- 290 CPY #$07
- 300 BNE LP
- 310 JSR UNLIS
- 320 NXTSEC JSR LIST;SEND SEC READ TO DISK
- 330 LDY #$00
- 340 LP1 LDA MW1,Y;SEC # TO $07 IN 1541
- 350 JSR OUT
- 360 INY
- 370 CPY #$07
- 380 BNE LP1
- 390 JSR UNLIS
- 400 JSR LIST;SEND "#$80" (READ)
- 410 LDY #$00
- 420 LP2 LDA MW2,Y; #$80 TO $00 IN 1541
- 430 JSR OUT
- 440 INY
- 450 CPY #$07
- 460 BNE LP2
- 470 JSR UNLIS
- 480 JSR CHKERR;WAIT FOR ERROR CODE
- 490 JMP RDDSK;READ SEC DATA FOR SEARCH STRING
- 500 END JSR INIT;FINISHED
- 510 JMP ($A002);BASICS WARM START
- 520 .FILE SRCH DSK 2
-